import request from '@/utils/request'

// 包车订单-订单列表
export function charteredBuslist(query) {
  return request({
    url: '/charteredBus/order/list',
    method: 'get',
    params: query
  })
}
// 包车订单-订单基础详情
export function charteredBusorder(orderNo) {
  return request({
    url: `/charteredBus/order/${orderNo}`,
    method: 'get'
  })
}
// 包车订单-根据车型方案选车
export function carListByMaintenance(query) {
  return request({
    url: '/charteredBus/order/carListByMaintenance',
    method: 'get',
    params: query
  })
}

// 包车订单-取消订单
export function charteredcancel(orderNo) {
  return request({
    url: `/charteredBus/order/cancel/${orderNo}`,
    method: 'post'
  })
}

// 包车订单-修改订单
export function charteredorder(data) {
  return request({
    url: '/charteredBus/order',
    method: 'put',
    data: data
  })
}

// 包车订单-删除订单
export function chartereddelete(orderNo) {
  return request({
    url: `/charteredBus/order/${orderNo}`,
    method: 'DELETE'
  })
}

// 包车订单-订单详情-租金信息-页面请参考日租详情
export function orderRentDetail(orderNo) {
  return request({
    url: `/charteredBus/order/orderRentDetail/${orderNo}`,
    method: 'get'
  })
}

// 包车订单-订单详情-押金信息-页面请参考日租详情
export function orderDepositDetail(orderNo) {
  return request({
    url: `/charteredBus/order/orderDepositDetail/${orderNo}`,
    method: 'get'
  })
}

// 包车订单-订单详情-车损信息-页面请参考日租详情
export function orderVehicleDetail(orderNo) {
  return request({
    url: `/charteredBus/order/orderVehicleDetail/${orderNo}`,
    method: 'get'
  })
}

// 包车订单-分配司机
export function charteredDistributionDriver(data) {
  return request({
    url: '/charteredBus/order/distributionDriver',
    method: 'put',
    data: data
  })
}



// 包车订单-分配车辆
export function charteredSupplyCar(data) {
  return request({
    url: '/charteredBus/order/supplyCar',
    method: 'put',
    data: data
  })
}


// 包车订单-交还车验车
export function charteredDelivery(data) {
  return request({
    url: '/charteredBus/order/delivery',
    method: 'post',
    data: data
  })
}

// 包车订单-日程上报获取信息
export function reportGetInfo(orderNo) {
  return request({
    url: `/charteredBus/vehicleProgress/getOrderInfo/${orderNo}`,
    method: 'get'
  })
}

// 包车订单-提交日程上报
export function charteredAddReport(data) {
  return request({
    url: '/charteredBus/vehicleProgress',
    method: 'post',
    data: data
  })
}

// 包车订单-交车/还车验车单详情
export function deliveryInfo(orderNo, type) {
  return request({
    url: `/charteredBus/order/deliveryInfo/${orderNo}/${type}`,
    method: 'get'
  })
}

// 包车订单-订单司机日程列表
export function vehicleProgresslist(query) {
  return request({
    url: '/charteredBus/vehicleProgress/list',
    method: 'get',
    params: query
  })
}
